﻿#version 330
uniform mat4 ModelViewMatrix;
uniform mat4 ProjectionMatrix;
uniform mat3 ModelViewNormalMatrix;

in vec3 v_Position;
in vec3 v_Normal;

out vec3 f_Position;
out vec3 f_Normal;

void main(void)
{
    vec4 pos = ModelViewMatrix * vec4(v_Position, 1);
	
	f_Position = pos.xyz / pos.w;
	f_Normal = ModelViewNormalMatrix * v_Normal;

    gl_Position = ProjectionMatrix * ModelViewMatrix * vec4(v_Position, 1);
}
